import App from './App'

// #ifndef VUE3
import Vue from 'vue'
// 引入uView组件库
import uView from 'uview-ui'
Vue.use(uView)
// 引入全局组件
import NavBar from './components/NavBar'
import FilterAside from './components/FilterAside'
Vue.component('nav-bar', NavBar)
Vue.component('filter-aside', FilterAside)
// 将请求方法挂载到全局
import * as request from './utils/request'
for (const key in request) {
  Vue.prototype[key] = request[key]
}
// 注册全局事件总线
Vue.prototype.$bus = new Vue()
// 引入store
import store from './store/index'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App,
  store,
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app,
  }
}
// #endif
